﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace Hydra.Shell.Attributes
{
    [DebuggerDisplay("{ Value }")]
    public class GuidAttribute : Attribute
    {
        internal string _val;

        [DebuggerStepThrough()]
        public GuidAttribute(string guid)
        {
            this._val = guid;
        }

        public string Value
        {
            [DebuggerStepThrough()]
            get
            {
                return this._val;
            }
        }

        [DebuggerStepThrough()]
        public static bool operator==(GuidAttribute guidAttribute, string guidString)
        {
            return string.Compare(guidAttribute.Value, guidString, StringComparison.InvariantCultureIgnoreCase) == 0;
        }

        [DebuggerStepThrough()]
        public static bool operator !=(GuidAttribute guidAttribute, string guidString)
        {
            return !(guidAttribute.Value == guidString);
        }

        [DebuggerStepThrough()]
        public static bool operator ==(GuidAttribute guidAttribute, Guid guid)
        {
            return guidAttribute == guid.ToString();
        }

        [DebuggerStepThrough()]
        public static bool operator !=(GuidAttribute guidAttribute, Guid guid)
        {
            return guidAttribute != guid.ToString();
        }
    }
}
